package com.sbw.springcloud.consumer.feign.demo.service;

import com.sbw.springcloud.consumer.feign.demo.hystric.FeignServiceHystric;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: sangbowei
 * @Description: TODO
 * @Date: Created in  20:39 2017\12\26 0026
 **/
@FeignClient(value="eureka-client",fallback = FeignServiceHystric.class)
public interface FeignService {

    @RequestMapping(value = "/discovery_client",method = RequestMethod.GET)
    String feignDiscoveryClient();

    @GetMapping("/hello")
    String feignHello();

    @GetMapping("/hello_delay")
    String feignHelloDelay();

    @GetMapping("/hello_params")
    String feignHelloParams(@RequestParam(value = "name") String name);

    @GetMapping("/hello_client")
    String feignHelloClient();
}